//
//  blindApplyCell.m
//  jingdongfang
//
//  Created by MTiMac02 on 2017/8/23.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import "blindApplyCell.h"

@interface blindApplyCell()

@end
@implementation blindApplyCell
- (void)awakeFromNib {
    [super awakeFromNib];
    [self.acceptBtn.layer setCornerRadius:15.f];
    [self.acceptBtn setBackgroundColor:[UIColor whiteColor]];
    [self.acceptBtn.layer setBorderWidth:1.0];
    [self.acceptBtn.layer setBorderColor:[UIColor c1Color].CGColor];
    
    [self.acceptBtn setTapActionWithBlock:^{
        if (self.acceptBind && [self.status integerValue] == 3) {
            self.acceptBind();
        }
    }];
}

- (void)setStatus:(NSString *)status {
    _status = status;
    
    if ([self.status integerValue]==1) {
        [self.acceptBtn.layer setBorderColor:[UIColor clearColor].CGColor];
//        [self.acceptBtn setTitle:@"已同意" forState:UIControlStateNormal];
        [self.acceptBtn setTitle:NSLocalizedString(@"Approved", nil) forState:UIControlStateNormal];
        self.acceptBtn.tintColor=[UIColor c5Color];
    } else if ([self.status integerValue]==2) {
        [self.acceptBtn.layer setBorderColor:[UIColor clearColor].CGColor];
//        [self.acceptBtn setTitle:@"拒绝" forState:UIControlStateNormal];
        [self.acceptBtn setTitle:NSLocalizedString(@"Reject", nil) forState:UIControlStateNormal];
        self.acceptBtn.tintColor=[UIColor c5Color];
    } else if ([self.status integerValue]==3) {
        [self.acceptBtn.layer setBorderWidth:1.0];
//        [self.acceptBtn setTitle:@"同意" forState:UIControlStateNormal];
        [self.acceptBtn setTitle:NSLocalizedString(@"Approve", nil) forState:UIControlStateNormal];
        [self.acceptBtn.layer setBorderColor:[UIColor c1Color].CGColor];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
